package com.sbm.svc.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.sbm.domain.model.PermissionModel;
import com.sbm.domain.model.RoleModel;
import com.sbm.domain.model.UserModel;
import com.sbm.domain.repo.UserRepo;
import com.sbm.svc.UserService;

@Service
public class UserServiceImpl implements UserService {

	@Autowired
	private UserRepo userRepo;

	@Override
	public UserModel login(String name) {
		return this.userRepo.select(name);
	}

	@Override
	public List<UserModel> getAllUser() {
		return this.userRepo.getAllUser();
	}

	@Override
	public List<RoleModel> getAllRole() {
		return this.userRepo.getAllRole();
	}

	@Override
	public List<PermissionModel> getAllPermission() {
		return this.userRepo.getAllPermission();
	}
}
